home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 / IRIX 6.2 CD2.iso / dist / print.idb / usr / lib / print / lptopsProlog.z / lptopsProlog
Text File  |  1996-06-10  |  3KB  |  122 lines

  1.  
  2. %% ----------------------------------
  3. %% Gaudy Definitions ----------------
  4. %% ----------------------------------
  5.  
  6. /QSU { 100000 mul 72 div } def
  7. /DateFont {
  8.     findfont 16 QSU scalefont setfont
  9. } def
  10. /PageNoFont {
  11.     findfont 30 QSU scalefont setfont
  12. } def
  13. /TitleFont {
  14.     findfont 20 QSU scalefont setfont
  15. } def
  16.  
  17. %% Format : <gray_level> <left> <bottom> <width> <height> Rectangle
  18. /Rectangle
  19. {
  20.     /height exch def
  21.     /width exch def
  22.     /bottom exch def
  23.     /left exch def
  24.     /gray exch def
  25.     gray setgray
  26.     newpath
  27.     left bottom moveto
  28.     0 height rlineto
  29.     width 0 rlineto
  30.     0 height neg rlineto
  31.     closepath
  32. } bind def
  33. %% Format : <gray_level> <left> <bottom> <width> <height> RoundRectangle
  34. /RoundRectangle
  35. {
  36.     /height exch def
  37.     /width exch def
  38.     /bottom exch def
  39.     /left exch def
  40.     /gray exch def
  41.     /fourpops { 4 {pop} repeat } def
  42.     /radius 18 QSU def
  43.     gray setgray
  44.     gsave
  45.         left bottom translate
  46.         newpath
  47.         0 radius moveto
  48.         0 height width height radius arcto fourpops
  49.         width height width 0 radius arcto fourpops
  50.         width 0 0 0 radius arcto fourpops
  51.         0 0 0 height radius arcto fourpops
  52.         fill
  53.     grestore
  54. } bind def
  55. %% Format : <gray> <bounding_width> <bounding_height> <string> CentreString
  56. /CentreString {
  57.     /str exch def
  58.     /ht  exch def
  59.     /wd  exch def
  60.     /gray  exch def
  61.     gsave
  62.         gray 0 0 wd ht Rectangle clip
  63.         str dup
  64.         wd exch
  65.         stringwidth ht 
  66.         sub abs 2 div 2 div
  67.         3 1 roll 
  68.         sub abs 2 div
  69.         exch moveto
  70.         show
  71.     grestore
  72. } bind def
  73.  
  74. /GaudyHeader {
  75.     /Page  exch def
  76.     /landscape  exch def
  77.     /hdrHt 50 QSU def
  78.     /leftWd 72 QSU def
  79.     /Offset 2 QSU def
  80.     newpath clippath pathbbox   %% Get imageable area in the current units
  81.     /URy exch def
  82.     /URx exch def
  83.     /LLy exch def
  84.     /LLx exch def
  85.     landscape 1 eq
  86.     { LLx URy translate -90 rotate } if
  87.     newpath clippath pathbbox   %% Get imageable area in the current units
  88.     /URy exch def
  89.     /URx exch def
  90.     /LLy exch def
  91.     /LLx exch def
  92.     /TM URy Offset sub def
  93.     /BM LLy Offset add def
  94.     /LM LLx Offset add def
  95.     /RM URx Offset sub def
  96.     gsave
  97.         /Times-Bold DateFont
  98.         LM TM hdrHt sub abs translate
  99.         .8 0 0 leftWd hdrHt RoundRectangle 
  100.         0 setgray
  101.         7 QSU 30 QSU moveto
  102.         Date show
  103.         7 QSU 10 QSU moveto
  104.         Time show
  105.         gsave
  106.             /Times-Bold PageNoFont
  107.             RM LM sub leftWd sub abs 0 translate
  108.             .8 0 0 leftWd hdrHt RoundRectangle 
  109.             0 leftWd hdrHt Page CentreString
  110.         grestore
  111.         gsave
  112.             /Helvetica-Bold TitleFont
  113.             /InnerWd { RM LM sub leftWd 2 mul sub abs } def
  114.             /CBar 30 QSU def
  115.             leftWd 10 QSU translate
  116.             .9 0 0 InnerWd CBar RoundRectangle 
  117.             0 InnerWd CBar Title CentreString
  118.         grestore
  119.     grestore
  120. } bind def
  121.  
  122.